﻿using System;
using Castle.Windsor;
using Caven.IOC;

namespace LuKou.Web.BLL
{
    public class ServiceHelper
    {
        /// <summary>
        /// 获取一个服务接口
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id">服务接口对应的XML里面的id名称</param>
        /// <returns></returns>
        public static T Get<T>(String id)
        {
            IWindsorContainer _container = IOCManager.GetInstance();
            return (T)_container[id];
        }
    }
}
